/*
 * main.cpp
 *
 *  Created on: Aug 22, 2011
 *      Author: erudhes
 */
#include <wx/socket.h>
#include "App.h"
#include "MainFrame.h"
#include "Configuration.h"

IMPLEMENT_APP(App)

bool App::OnInit()
{
	mClientSocket = NULL;
	mServerSocket = NULL;
	// Load the configuration file
	mConfiguration = new Configuration::Configuration();
	// Has to be called once
	wxSocketBase::Initialize();
	// Show the window to the user
	mMainFrame = new MainFrame(wxT("Main Frame"));
	mMainFrame->Show(true);

    return true;
}

int App::OnExit()
{
	delete mConfiguration;
	mConfiguration = NULL;
	return this->wxApp::OnExit();
}
